package SPAN::Controller::Image;

use strict;
use warnings;
use base 'Catalyst::Controller::BindLex';

=head1 NAME

SPAN::Controller::Image - Catalyst Controller

=head1 DESCRIPTION

Catalyst Controller.

=head1 METHODS

=cut

=head2 index 

=cut

sub chart : Chained('/') Args(1) {
    my ( $self, $c, $format ) = @_;
    my @x = split /\s*,\s*/, $c->req->param('x');
    my @y = split /\s*,\s*/, $c->req->param('y');
    my $legend = $c->req->param('legend');
    my $graph : Stashed = { format => $format, x => \@x, y => \@y, legend => $legend };
    $c->forward('View::Chart');
}

=head1 AUTHOR

Eden Cardoso Cardim

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

1;
